/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Library General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
 */
 
/**
 * @version bridge.h 0.0.1
 * @package Comoro
 * @author Dr.NP <np@bsgroup.org>
 * 
 * Base server to center connector header
 */

#include <event.h>

// Constants
#define BRIDGE_MODE_LOGIN					0
#define BRIDGE_MODE_UNITED					1
#define BRIDGE_MODE_BASE						2
#define BRIDGE_MODE_CENTER					3
#define BRIDGE_MODE_COIN						4

/* BEGIN OF FUNCTION DEFINE */
int bridge_init								(int);
int bridge_get_mode							();
int bridge_reg_center						(int, unsigned long long, char *, unsigned int);
int bridge_unreg_center						(int);
int bridge_to_client							(int, char *, int);
int bridge_to_base							(int, char *, int);
int bridge_to_center							(int, char *, int);
int bridge_to_login							(char *, int);
void bridge_on_read							(void *, unsigned int);
void bridge_on_login_read					(void *, unsigned int);
void bridge_on_close							();
void bridge_on_login_close					();
/* END OF FUNCTION DEFINE */
